Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development


Invoking the field edits from an SDO

The rowObjectValidate procedure in an SDO’s logic procedure has statements in it that are generated by the Object Generator, to verify, among other things, that mandatory fields (as designated in the Data Dictionary) are filled in. The code is in the following form for each mandatory field:

IF isFieldBlank(b_Customer.Comments) THEN 
    ASSIGN 
      cMessageList = cMessageList + (IF NUM-ENTRIES(cMessageList,CHR(3)) > 0  
           THEN CHR(3) ELSE '':U) + 
                    {aferrortxt.i 'AF' '1' 'Customer' 'Comments' "'Comments'"}. 

The presumption of the example is that you want to replace this standard check with a check based on the data you have entered into the field_edit table. So, you should edit the logic procedure of an SDO and replace these statements with a single call to fieldEditValidate. It will return a message string in the same format as that generated by the other validation checks, as shown:

Procedure rowObjectValidate: 
/*------------------------------------------------------------------------- 
  Purpose:     Procedure used to validate RowObject record client-side 
  Parameters:  <none> 
  Notes:        
-------------------------------------------------------------------------*/ 
  DEFINE VARIABLE cMessageList    AS CHARACTER    NO-UNDO. 
  DEFINE VARIABLE cValueList      AS CHARACTER    NO-UNDO. 
    
  RUN fieldEditValidate IN TARGET-PROCEDURE (OUTPUT cMessageList). 
  ASSIGN ERROR-STATUS:ERROR = NO. 
  RETURN cMessageList. 
END PROCEDURE. 


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095